package com.youlai.boot.factory.model.form;

import java.io.Serial;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import jakarta.validation.constraints.*;

/**
 * 服装款式表单对象
 *
 * @author youlaitech
 * @since 2025-07-06 16:03
 */
@Getter
@Setter
@Schema(description = "服装款式表单对象")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class GarmentStyleForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "自增主键")
    private Integer id;

    @Schema(description = "款号（唯一标识，如FW2024-001）")
    @NotBlank(message = "款号（唯一标识，如FW2024-001）不能为空")
    @Size(max=32, message="款号（唯一标识，如FW2024-001）长度不能超过32个字符")
    private String styleCode;

    @Schema(description = "款名称（如休闲廓形衬衫）")
    @Size(max=100, message="款名称（如休闲廓形衬衫）长度不能超过100个字符")
    private String styleName;

    @Schema(description = "款备注（特殊工艺/面料说明）")
    @Size(max=65535, message="款备注（特殊工艺/面料说明）长度不能超过65535个字符")
    private String styleNotes;

    @Schema(description = "颜色（可多选，用逗号分隔，如白色,藏青）")
    @Size(max=100, message="颜色（可多选，用逗号分隔，如白色,藏青）长度不能超过100个字符")
    private String color;

    @Schema(description = "码数（可多选，用逗号分隔，如S,M,L）")
    @Size(max=100, message="码数（可多选，用逗号分隔，如S,M,L）长度不能超过100个字符")
    private String size;

    @Schema(description = "单价（零售价，单位：元）")
    private BigDecimal unitPrice;

    @Schema(description = "裁床价（生产成本，单位：元）")
    private BigDecimal cuttingPrice;


    /**
     * 外发价格（外发加工单价，单位：元）
     */
    @Schema(description = "外发价格（外发加工单价，单位：元）")
    private BigDecimal outsourcedPrice;

    /**
     * 员工价格（员工购买价格，单位：元）
     */
    @Schema(description = "员工价格（员工购买价格，单位：元）")
    private BigDecimal employeePrice;

    @Schema(description = "款图片URL（存储图片路径或链接）")
    @Size(max=255, message="款图片URL（存储图片路径或链接）长度不能超过255个字符")
    private String imageUrl;

    @Schema(description = "分类（如上衣/裤装/连衣裙）")
    @Size(max=50, message="分类（如上衣/裤装/连衣裙）长度不能超过50个字符")
    private String category;

    @Schema(description = "状态：开发中/在售/停售/缺货")
    @NotNull(message = "状态：开发中/在售/停售/缺货不能为空")
    @Size(max=12, message="状态：开发中/在售/停售/缺货长度不能超过12个字符")
    private String status;

    @Schema(description = "创建人ID")
    private Long createBy;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改人ID")
    private Long updateBy;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /**
     * 客户id
     */
    private String customerId;

    /**
     * 客户名称
     */
    private String customerName;
}
